pcx: Write waypoint altitude. Fix depending testo sequence.
authoroliskoli <oliskoli>
Sun, 9 Mar 2008 00:38:34 +0000 (00:38 +0000)
committeroliskoli <oliskoli>
Sun, 9 Mar 2008 00:38:34 +0000 (00:38 +0000)
pcx.c
testo

diff --git a/pcx.c b/pcx.c
index 7401e147e354e50db86127b149bc420bd0b34c84..d447ec76f885990c27897c610cbbdf5f6eb673de 100644 (file)
--- a/pcx.c
+++ b/pcx.c
@@ -319,7 +319,7 @@ gpsutil_disp(const waypoint *wpt)
        }
 
 
-       gbfprintf(file_out, "W  %-6.6s %c%08.5f %c%011.5f %s %5d %-40.40s %5e  %d\n",
+       gbfprintf(file_out, "W  %-6.6s %c%08.5f %c%011.5f %s %5.f %-40.40s %5e  %d\n",
                 global_opts.synthesize_shortnames ?
                         mkshort_from_wpt(mkshort_handle, wpt) : 
                        wpt->shortname,
@@ -328,7 +328,7 @@ gpsutil_disp(const waypoint *wpt)
                lon < 0.0 ? 'W' : 'E',
                fabs(lon),
                tbuf, 
-               -9999,
+               (wpt->altitude == unknown_alt) ? -9999 : wpt->altitude,
                (wpt->description != NULL) ? wpt->description : "",
                0.0,
                icon_token);
diff --git a/testo b/testo
index e9b3ca012819fafa21ac034a0975d42d9088d265..6f2b80a788a2023339bbeed085111c5f1c8da94c 100755 (executable)
--- a/testo
+++ b/testo
@@ -163,7 +163,7 @@ compare ${REFERENCE}/xmap ${TMPDIR}/xmap
 
 # PCX (Garmin mapsource import) file format
 rm -f ${TMPDIR}/mm.pcx ${TMPDIR}/pcx.gps
-${PNAME} -i geo -f ${REFERENCE}/../geocaching.loc -o pcx -F ${TMPDIR}/mm.pcx
+${PNAME} -i gpx -f ${REFERENCE}/geocaching.gpx -o pcx -F ${TMPDIR}/mm.pcx
 ${PNAME} -i pcx -f ${TMPDIR}/mm.pcx -o gpsutil -F ${TMPDIR}/pcx.gps
 compare ${TMPDIR}/mm.gps ${TMPDIR}/gu.wpt
 ${PNAME} -t -i gpx -f ${REFERENCE}/track/tracks.gpx -o pcx -F ${TMPDIR}/pcx.trk